<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script>
        // 交换两个变量的值

        var tmp1="张三";
        var tmp2="李四";

        var tmp=tmp1;
        tmp1=tmp2;
        tmp2=tmp;

        console.log(tmp1,tmp2);
    </script>
</head>
<body>
    
</body>
</html>